5
5
.
.
2
2
0
0
.
.
s
s
c
c
a
a
l
l
e
e
E
E
f
f
f
f
e
e
c
c
t
t
I
I
n
n
f
f
o
o
[
[
R
R
]
]
.scaleEffect modifier lets you increase or decrease the size of a View.
Syntax
.scaleEffect(5) //The same scaling in both directions
.scaleEffect(x: 1, y: 5) //Different scaling in each direction
.scaleEffect(2, anchor: .bottomTrailing) //Specifiy from where to do scaling
.scaleEffect(isPressed ? 0.5 : 1.0)
E
E
x
x
a
a
m
m
p
p
l
l
e
e
Example
struct ContentView : View {
var body: some View {
VStack {
Text("Hello")
Text("World").scaleEffect(5)
}
}
}
Output